<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<script>
			var a = 9;
			//不要用let 定义变量 有的浏览器不支持
			function func1() {
				// 
				if(a < 10) {
					var bloc = 3;
					console.log("a=" + a);
					// console.log("b="+block_var);
				}
				//console.log("b="+block_var);
				var c = 3;
				//console.log("c="+a);
			}
			//func1();

			var fn2 = function() {
				this.take = function() {
					return 10;
				}
			}

			//console.log( (new fn2()).take());
			var fn3 = new function() {
				var arg1, arg2, argN, funcBody;
				this.take = function() {
					return 11;
				}
			}
			//console.log( fn3.take());

			var fn4 = function(f) {
				this.take = function() {
					return f.take() + 2;
				}
			}
			//console.log( (new fn4(fn3)).take());

			// 不要用这种方式定义函数，有的浏览器不支持 
			//   var fn5 = (f) => {
			//		return f.take()+3;
			//	}
			
			
			var obj = {
				prop: 'value',
				fn: function() {
					return 99;
				}
			};
			alert(obj.fn());
		</script>
	</head>

	<body>
	</body>

</html>